package com.edt.ichannel.api.service.impl;

import com.edt.ichannel.api.dao.CommissionSuperaddDao;
import com.edt.ichannel.api.entiy.local.CommissionSuperadd;
import com.edt.ichannel.api.service.CommissionSuperaddService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;


/**
 * CommissionSuperadd服务接口实现类
 * @author 李爽
 * @date 2019-01-10
 */
@Service
public class CommissionSuperaddServiceImpl implements CommissionSuperaddService {

    @Resource
    private CommissionSuperaddDao commissionsuperaddDao;



    @Override
    public List<CommissionSuperadd> getAllNeedPutOut() {
        return commissionsuperaddDao.getAllNeedPutOut();
    }

    @Override
    @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
    public void updateCommissionSuperaddToPutoutOver(String id) {
        commissionsuperaddDao.updateCommissionSuperaddToPutoutOver(id,new Date());
    }

    @Override
    public List<CommissionSuperadd> selectNeedComputBonusSuperadd() {
        return commissionsuperaddDao.selectNeedComputBonusSuperadd();
    }


}